import java.util.Scanner;

public class Test {
    public static int fun3(int n) {
        if( n <=9 ) {
            System.out.println(n%10);
        }
        System.out.println(n%10);
        return fun3(n/10);
    }
    public static void main3(String[] args) {
        fun3(1234);
    }
    public static int fun1(int n) {
        if( n <= 1) {
            return 1;
        }
        return n+fun1(n-1);
    }
    public static void main2(String[] args) {
        System.out.println(fun1(10));
    }
    public static int fun(int n) {
        if( n <= 1) {
            return 1;
        }
        return n*fun(n-1);
    }
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个整数N:");
        int num = sc.nextInt();
        System.out.println("N的阶乘为:"+fun(num));
    }
}
